{template header}
{if $search}
<link rel="stylesheet" href="static/calendar/js/calendar.css" />
<script type="text/javascript" charset="utf-8" src="static/calendar/calendar.php"></script>
<h4 style="padding-left:10px;"><span>搜索</span><i class="icon-search"></i></h4>
<form class="form-horizontal" method="post" action="">
    <div class="control-group search-group">
        <label class="control-label" >资讯ID：</label>
        <div class="controls">
          <input type="text" placeholder="资讯ID" name="news_id" value="{$search['news_id']}">
        </div>
    </div>
    <div class="control-group search-group">
        <label class="control-label" >开始时间：</label>
        <div class="controls">
            <input type="text" name="startTime" id="date_time_id" value="{$search['startTime']}">　
            <button name="date_time_btn" type="button" id="date_time_btn" onclick="return showCalendar('date_time_id', '%Y-%m-%d %H:%M:%S', '24', false, 'date_time_btn');" class="button" id="date_time_id"/>选择</button>
        </div>
    </div>
    <div class="control-group search-group">
        <label class="control-label" >结束时间：</label>
        <div class="controls">
            <input type="text" name="endTime" id="date_time_id2" value="{$search['endTime']}">　
            <button name="date_time_btn2" type="button" id="date_time_btn2" onclick="return showCalendar('date_time_id2', '%Y-%m-%d %H:%M:%S', '24', false, 'date_time_btn2');" class="button" id="date_time_id2"/>选择</button>
        </div>
    </div>
    <div class="control-group search-group">
        <div class="controls">
            <button class="btn" type="submit">提交</button>
            <button class="btn" type="reset">重置</button>
        </div>
    </div>
</form>
{/if}
<div class="bs-docs-example" style="clear:both;">
    <table class="table table-striped">
        <thead>
            <tr>
                <th>日期</th>
                <th>资讯Id</th>
                <th>总点击</th>
                <th>安卓点击</th>
                <th>安卓点击设备数</th>
                <th>安卓推送点击</th>
                <th>IOS点击</th>
                <th>IOS点击设备数</th>
                <th>IOS推送点击</th>
            </tr>
        </thead>
        <tbody>
            {loop $clickData $k $v}
            <tr>
                <td>{eval echo date('Y-m-d H:i:s', $v['add_time'])}</td>
                <td><a href="news/{$v['news_id']}.html" target="_black">{$v['news_id']}</a></td>
                <td>{$v['totalClick']}</td>
                <td>{$v['andCount']}</td>
                <td>{$v['andCCount']}</td>
                <td>{$v['andPushCount']}</td>
                <td>{$v['iosCount']}</td>
                <td>{$v['iosCCount']}</td>
                <td>{$v['iosPushCount']}</td>
            </tr>
            {/loop}
        </tbody>
    </table>
</div>
<div class="pagination">
    <ul>
        {$pageStr}
    </ul>
</div>

{template footer}
